subroutine kernel(e,ep,r)
  use param
  use global
  implicit none
  real(dbl),intent(in) :: e,ep
  real(dbl),intent(out) :: r
  real(dbl) :: t,t1,t2,t3
  r=0
  if (ep.ge.e) return
  t=e*(e-ep)*k1
  t1=k2/t**1.5
  t2=(kl*t**(0.5-km))/((1.0+(2.0*kl*t**(1.0-km))**kq)**ikq)
  t3=e*k3
  r=t1*t2*t3
  return
end subroutine kernel
